package jm.nj.day08jia.demo07;

/*
 * 判断是否为对阵字符串
 *
 * 定义方法 接收String  返回是否为对阵字符串"aca"
 *
 * String s
 * boolean
 * */
public class Test06 {
    public static void main(String[] args) {
        String s = "abc";
        System.out.println(compare(s));
    }

    public static boolean compare(String s) {
        StringBuilder sb = new StringBuilder(s);
        sb.reverse();
        String s1 = sb.toString();
        return s1.equals(s);
    }
}
